package lec09.pm;

import java.util.HashMap;
import java.util.Map;

public class DatabaseDemo {
	
	
public static void main(String[] args) {
	Map<String,String> contacts=new HashMap<String,String>();
	contacts.put("Tom", "12345678");
	//call tom
	call(contacts,"Tom");
	contacts.put("Jerry", "12345678");
	call(contacts,"Jerry");
	contacts.remove("Tom");
	call(contacts,"Tom");
	contacts.put("Jerry", "1388888888");
	call(contacts,"Jerry");
	System.out.println(contacts);
}

/**
 * @param contacts
 */
private static void call(Map<String, String> contacts,String name) {
	System.out.println("Calling "+contacts.get(name)+".....");
}
}
